.Dd $Mdocdate: February 23 2015 $
.Dt BN_COPY 3
.Os
.Sh NAME
.Nm BN_copy ,
.Nm BN_dup
.Nd copy BIGNUMs
.Sh SYNOPSIS
.In openssl/bn.h
.Ft BIGNUM *
.Fo BN_copy
.Fa "BIGNUM *to"
.Fa "const BIGNUM *from"
.Fc
.Ft BIGNUM *
.Fo BN_dup
.Fa "const BIGNUM *from"
.Fc
.Sh DESCRIPTION
.Fn BN_copy
copies
.Fa from
to
.Fa to .
.Fn BN_dup
creates a new
.Vt BIGNUM
containing the value
.Fa from .
.Sh RETURN VALUES
.Fn BN_copy
returns
.Fa to
on success,
.Dv NULL
on error.
.Fn BN_dup
returns the new
.Vt BIGNUM ,
or
.Dv NULL
on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr bn 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn BN_copy
and
.Fn BN_dup
are available in all versions of SSLeay and OpenSSL.
